#ifndef _MyGenContainer_H_
#define _MyGenContainer_H_

#include "MyBaseGen.hh"
#include "MyGenCreator.hh"
#include "MyBasePos.hh"
#include "MyPosCreator.hh"
#include "yaml-cpp/yaml.h"

class MyGenContainer
{
public:
    static MyGenContainer& GetInstance()
    {
        static MyGenContainer Instance;
        return Instance;
    }
    ~MyGenContainer()
    {
        if(m_MyGenPtr != nullptr)
            delete m_MyGenPtr;
        if(m_MyPosPtr != nullptr)
            delete m_MyPosPtr;
    }

    void Config(YAML::Node);
    void Initialize();
    MyBaseGen* GetMyGen() {return m_MyGenPtr;}
    MyBasePos* GetMyPos() {return m_MyPosPtr;}
    const YAML::Node& GetConfig() const {return m_Config;}

private:
    MyGenContainer()
    {
        m_MyGenPtr = nullptr;
        m_MyPosPtr = nullptr;
    }

    YAML::Node m_Config;

    std::string m_MyGenType;
    MyBaseGen* m_MyGenPtr;

    std::string m_MyPosType;
    MyBasePos* m_MyPosPtr;
};

#endif